<template>
    <div>
        <p class="noneFollow" v-if="none === true">您还没有关注的用户</p>
        <lazy-component v-if="none !== true">
            <Post v-for="(post,index) in list" :key="index" :post="post" :isGroup="false" v-lazy="post"/>
        </lazy-component>
    </div>
</template>

<script>
import Post from '../common/post/Post.vue'
import axios from 'axios'
import jwtDecode from 'jwt-decode'
export default {
    name:'Follow',
    data() {
        return {
            list:null,
            decode:null,
            none:null
        }  
    },
    components:{
        Post
    }, 
    mounted() {
        // let token=sessionStorage.getItem("token")
        // this.decode = jwtDecode(token);
        // axios({
        //     url:'/follow/findFollows',
        //     method:'get',
        //     param:{
        //         userId:String(this.decode.userId)
        //     },
        //     headers:{
        //         'Authentication-Token':JSON.parse(sessionStorage.getItem("token"))
        //     }
        // }).then(data=>{
        //     if(data.data.data === '没有用户'){
        //         this.none = true
        //     }else{
        //         if(data.data.code === 20000){
        //             this.list = data.data.data
        //         }
        //     }
        //     console.log(data)
        // }).catch(err=>{
        //     console.log(err)
        // }) 
        this.list = [
            {
                bodyId: 34,
                classname: "交流圈子",
                collection: 147,
                content: "日出",
                img: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.lemeitu.com%2Fm00%2Fc9%2F59%2F5e77d24e00349caf34a919bf869a7be6__w.jpg&refer=http%3A%2F%2Fimg.lemeitu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651479685&t=edb2d0acaa5eb1d965f553d9277c835a",
                imgs: `https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwtkoss.weituk.com%2Fwp-content%2Fuploads%2F2020%2F01%2FIMG_3849.jpg&refer=http%3A%2F%2Fwtkoss.weituk.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=f9a16d4ef70eade459c82bbea73c8ce35;https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic1.win4000.com%2Fmobile%2F2020-02-19%2F5e4cd114ddca1.jpg&refer=http%3A%2F%2Fpic1.win4000.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=e023467fcb11b178ca252b254037d60b;https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.soumeitu.com%2Fwp-content%2Fuploads%2F2020%2F02%2F5e42368533f46.jpg&refer=http%3A%2F%2Fwww.soumeitu.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=ea4072a84561b93d95dc1c9e9aacc6bf;https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.zzvips.com%2Fuploads%2Fallimg%2F191126%2F223U260Y-2.jpg&refer=http%3A%2F%2Fwww.zzvips.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=c6d188d5e21501a94a1d98512a8bcf4f;https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fupload-images.jianshu.io%2Fupload_images%2F26702071-99df6520cc7c4a52.jpg&refer=http%3A%2F%2Fupload-images.jianshu.io&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=4840b6f52f3449763643023baf5d8b5f;https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201610%2F18%2F20161018154140_LrvVN.jpeg&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=9e483273fc543b1fbb71d80217bebd76;
                https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F201701%2F03%2F20170103132202_i2Y5A.thumb.1000_0.jpeg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=953e80ae0f06b4291c0e97caf515fdbb;
                https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201703%2F07%2F20170307160239_kQMas.thumb.700_0.jpeg&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=c9ec0fe407f024c16d02f79e010f6679;
                https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg9.51tietu.net%2Fpic%2F2019-091212%2Fqugo5dowqjwqugo5dowqjw.jpg&refer=http%3A%2F%2Fimg9.51tietu.net&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=4756dc60a606236958a8984f2f860b55
                `,
                nickname: "图片集",
                praise: 294,
                state: 0,
                time: "2022-02-28 19:45:31",
                userId: 11,
            },
            {
                bodyId: 34,
                classname: "交流圈子",
                collection: 12,
                content: "图片",
                img: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.lemeitu.com%2Fm00%2Fc9%2F59%2F5e77d24e00349caf34a919bf869a7be6__w.jpg&refer=http%3A%2F%2Fimg.lemeitu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651479685&t=edb2d0acaa5eb1d965f553d9277c835a",
                imgs: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201701%2F03%2F20170103132147_ahdkQ.jpeg&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=8890337ccdd198dca270e32d56205641,https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.lemeitu.com%2Fm00%2Fc9%2F59%2F5e77d24e00349caf34a919bf869a7be6__w.jpg&refer=http%3A%2F%2Fimg.lemeitu.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479685&t=edb2d0acaa5eb1d965f553d9277c835a,https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.zzvips.com%2Fuploads%2Fallimg%2F191126%2F223U26262-8.jpg&refer=http%3A%2F%2Fwww.zzvips.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=024f79b1cdb26496abdeb550841586b4",
                nickname: "图片集",
                praise: 14,
                state: 0,
                time: "2022-03-28 9:13:3",
                userId: 11,
            },
            {
                bodyId: 34,
                classname: "交流圈子",
                collection: 12,
                content: "日出",
                img: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.lemeitu.com%2Fm00%2Fc9%2F59%2F5e77d24e00349caf34a919bf869a7be6__w.jpg&refer=http%3A%2F%2Fimg.lemeitu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651479685&t=edb2d0acaa5eb1d965f553d9277c835a",
                imgs: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.lemeitu.com%2Fm00%2Fc9%2F59%2F5e77d24e00349caf34a919bf869a7be6__w.jpg&refer=http%3A%2F%2Fimg.lemeitu.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479685&t=edb2d0acaa5eb1d965f553d9277c835a,https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.zzvips.com%2Fuploads%2Fallimg%2F191126%2F223U26262-8.jpg&refer=http%3A%2F%2Fwww.zzvips.com&app=2002&size=f999910000&q=a80&n=0&g=0n&fmt=auto?sec=1651479686&t=024f79b1cdb26496abdeb550841586b4",
                nickname: "图片集",
                praise: 14,
                state: 0,
                time: "2022-03-28 19:45:31",
                userId: 11,
            },
        ]
    },
}
</script>

<style>
.noneFollow{
    width: 100%;
    text-align: center;
    font-size: 20px;
    margin-top: 25px;
}
</style>